function SellMode_OnLoad(this) --Function OnLoad
	this:RegisterEvent("STORE_OPEN")
    
end

function SellMode_OnEvent(event) --Function OnEvent
	if ( event == "STORE_OPEN" ) then
		SellModeFrame:Hide()
	end
end


function Sellslots1()   --Function SellSlot 1
  if StoreFrame:IsVisible() then
    for i=1,30,1 do local inventoryIndex,a,name,b,c,d = GetBagItemInfo(i);UseBagItem(inventoryIndex);
    end;
  end
end

function Sellslots2()   --Function SellSlot 2
  if StoreFrame:IsVisible() then
    for i=31,60,1 do local inventoryIndex,a,name,b,c,d = GetBagItemInfo(i);UseBagItem(inventoryIndex);
    end;
  end
end

function Sellslots3()   --Function SellSlot 3
  if StoreFrame:IsVisible() then
    for i=61,90,1 do local inventoryIndex,a,name,b,c,d = GetBagItemInfo(i);UseBagItem(inventoryIndex);
    end;
  end
end

function Sellslots4()   --Function SellSlot 4
  if StoreFrame:IsVisible() then
    for i=91,120,1 do local inventoryIndex,a,name,b,c,d = GetBagItemInfo(i);UseBagItem(inventoryIndex);
    end;
  end
end

function Sellslots5()   --Function SellSlot 5
  if StoreFrame:IsVisible() then
    for i=121,150,1 do local inventoryIndex,a,name,b,c,d = GetBagItemInfo(i);UseBagItem(inventoryIndex);
    end;
  end
end

function Sellslots6()   --Function SellSlot 6
  if StoreFrame:IsVisible() then
    for i=151,180,1 do local inventoryIndex,a,name,b,c,d = GetBagItemInfo(i);UseBagItem(inventoryIndex);
    end;
  end
end

